<%= form_for(:user, url:'/login') do |f| %>

  <div class="field">
    <%= f.label :username %>
    <%= f.text_field :username, :required => true%>
  </div>

  <div class="field">
    <%= f.label :password %>
    <%= f.password_field :password, :required => true %>
  </div>

  <div class="actions">
    <%= f.submit  value='登录'%>
  </div>
<% end %>
